package com.train.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.train.common.ServerResponse;
import com.train.service.ICourService;

@Controller
@RequestMapping("/course/")
public class CourseController {
	
	@Autowired
	private ICourService courseService;
	
	//根据课程类型找到相对应的课程,只查询上架的课程
	@RequestMapping("selectCourseByCourseTypeId.do")
	@ResponseBody
	public ServerResponse selectCourseByCourseTypeId(Integer courseTypeId){
		return courseService.selectCourseByCourseTypeId(courseTypeId);
	}

}
